package com.pi.pro.xcmg.am.common.vo;





import com.fasterxml.jackson.annotation.JsonView;
import com.pi.framework.core.bean.PageResult;
import lombok.Getter;
import lombok.Setter;
import org.springframework.data.jpa.datatables.mapping.DataTablesOutput;

import java.io.Serializable;

/**
 *  反馈结果数据
 */
@Getter
@Setter
public class CommonExchangeResultData<T> implements Serializable {

    //
    @JsonView({DataTablesOutput.View.class, PageResult.View.class})
    private String returestate= "";//ExchangeConstants.REPLY_MESSAGE_STATE_SUCCESS;

    @JsonView({DataTablesOutput.View.class, PageResult.View.class})
    private String returecode="";

    @JsonView({DataTablesOutput.View.class, PageResult.View.class})
    private String returetext="";

    @JsonView({DataTablesOutput.View.class, PageResult.View.class})
    private String key="";

    @JsonView({DataTablesOutput.View.class, PageResult.View.class})
    private T data;


    public String toString() {
        StringBuffer buf = new StringBuffer();
        buf.append("{");
        //
        buf.append("returestate:");
        if (this.returestate != null) {
            buf.append(this.returestate);
        } else {
            buf.append("");
        }
        buf.append(",");
        //
        buf.append("returecode:");
        if (this.returecode != null) {
            buf.append(this.returecode);
        } else {
            buf.append("");
        }
        buf.append(",");
        //
        buf.append("returetext:");
        if (this.returetext != null) {
            buf.append(this.returetext);
        } else {
            buf.append("");
        }
        buf.append(",");
        //
        buf.append("key:");
        if (this.key != null) {
            buf.append(this.key);
        } else {
            buf.append("");
        }
        buf.append(",");
        //
        buf.append("data:");
        if (this.data != null) {
            buf.append(this.data);
        } else {
            buf.append("");
        }
        buf.append("");
        buf.append("}");
        return buf.toString();
    }
}
